import constant.Constant;
import test_achieve.DataStatistics;
import util.ConfigLoader;
import util.tools.CommonTools;

/**
 * Created by chenkuo on 2018/3/30.
 */
public class ZGlobal {
    public static void main(String[] args2) throws Throwable {
        System.out.println("*****************");
        String mode = null;

        String[] parms = new String[args2.length-2];

        for(int i=0;i<args2.length;i++){
            if(args2[i].equals("-evn")){
                mode = args2[++i];
                DataStatistics dataStatistics = new DataStatistics();
                Constant.evn = mode;
                break;
            }
//            System.out.println("参数"+args2[i]);
            parms[i] = args2[i];
        }

        for (int i = 0; i <args2.length-2; i++) {
            Constant.runParms.add(parms[i]);
            System.out.println("参数："+parms[i]);
        }

        ConfigLoader.load(mode+".properties");
//        cucumber.api.cli.Main.main(parms);
        CommonTools.runAuto(parms);

    }
}
